package task3;

public class Zoo {
	private static final int ARRAY_LENGTH = 10;
	Animal[] animals = new Animal[10];
	private static int indexOfArr = 0;

	public Animal[] getAnimals() {
		return animals;
	}

	public void setAnimals(Animal[] animals) {
		this.animals = animals;
	}
	public void addAnimal(Animal animal){
		if(animal!=null&&indexOfArr<ARRAY_LENGTH){
			this.animals[indexOfArr] = animal;
			indexOfArr++;
		}
	}
}
